import axios from "axios";
import getData from "./getData";
export default function (params,relGroup,callback, errFn) {
    let options = {
        method: "put",
        url: window.api.config_host+"/resourceConfig/resource/sorting/integral",
        data: params,
        headers: {sessionId: getCookie("sessionId")}
    }
    axios(options).then(data => {
        if (data.status === 200 && data.data.returnCode === 1) {
            callback && getData(callback,relGroup);
        } else {
            errFn && errFn();
        } 
    }).catch(err => {
        console.log(err);
        errFn && errFn();
    });
}
